package com.atom.common.entity.bo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class JsonDiagram implements Serializable {
  
  /** serialVersionUID*/
  private static final long serialVersionUID = 1L;
  
  private String id;
  private String name;  
  private String sourceRef;
  private String targetRef;
  private String shapeC;
  private float shapeH;
  private float shapeW;
  private List<XY> positions;
  private int state;
  private List<SubDiagram> datas;
  
  private class XY implements Serializable {
    /** serialVersionUID*/
    private static final long serialVersionUID = 1L;
    
    private float shapeX;
    private float shapeY;    
    
    public XY(float shapeX, float shapeY) {
      super();
      this.shapeX = shapeX;
      this.shapeY = shapeY;
    }
    public float getShapeX() {
      return shapeX;
    }
    public void setShapeX(float shapeX) {
      this.shapeX = shapeX;
    }
    public float getShapeY() {
      return shapeY;
    }
    public void setShapeY(float shapeY) {
      this.shapeY = shapeY;
    }
  }
  
  public JsonDiagram() {
    super();
    this.positions = new ArrayList<XY>();
  }
  public String getId() {
    return id;
  }
  public void setId(String id) {
    this.id = id;
  }
  public String getName() {
    return name;
  }
  public void setName(String name) {
    this.name = name;
  }
  public String getSourceRef() {
    return sourceRef;
  }
  public void setSourceRef(String sourceRef) {
    this.sourceRef = sourceRef;
  }
  public String getTargetRef() {
    return targetRef;
  }
  public void setTargetRef(String targetRef) {
    this.targetRef = targetRef;
  }
  public String getShapeC() {
    return shapeC;
  }
  public void setShapeC(String shapeC) {
    this.shapeC = shapeC;
  }
  public float getShapeH() {
    return shapeH;
  }
  public void setShapeH(float shapeH) {
    this.shapeH = shapeH;
  }
  public float getShapeW() {
    return shapeW;
  }
  public void setShapeW(float shapeW) {
    this.shapeW = shapeW;
  }
  public void setShapeXY(float shapeX, float shapeY) {
    XY xy = new XY(shapeX, shapeY);
    positions.add(xy);
  }
  public int getState() {
    return state;
  }
  public void setState(int state) {
    this.state = state;
  }
  public List<SubDiagram> getDatas() {
    return datas;
  }
  public void setDatas(List<SubDiagram> datas) {
    this.datas = datas;
  }
  public List<XY> getPositions() {
    return positions;
  }
  public void setPositions(List<XY> positions) {
    this.positions = positions;
  }
}
